
declare module Microsoft.Office.WebExtension {

    /** Represents an XML node in a tree in a document. */
    export class CustomXmlNode {

        /** Gets the base name of the node without the namespace prefix, if one exists. */
        baseName: string;

        /** Gets the type of the CustomXMLNode. */
        nodeType: CustomXMLNodeType;

        /** Retrieves the string GUID of the CustomXMLPart. */
        namespaceUri: string;

        /** Gets the nodes as an array of CustomXMLNode objects matching the relative XPath expression. */
        getNodesAsync(xPath: string, options?: { asyncContext?: any; }, callback?: (result: AsyncResult) => void);

        /** Asynchronously gets the value of the node. */
        getNodeValueAsync(options?: { asyncContext?: any; }, callback?: (result: AsyncResult) => void);

        /** Asynchronously gets the XML of the node. */
        getXmlAsync(options?: { asyncContext?: any; }, callback?: (result: AsyncResult) => void);

        /** Asynchronously sets the value of the node. */
        setNodeValueAsync(value: string, options?: { asyncContext?: any; }, callback?: (result: AsyncResult) => void);

        /** Sets the XML of the node. */
        setXmlAsync(xml: string, options?: { asyncContext?: any; }, callback?: (result: AsyncResult) => void);
    }
}